3.138 \(\int \frac{a+b \tan ^{-1}(c x)}{x (d+e x)} \, dx\)

Optimal. Leaf size=181 \[ \frac{i b \text{PolyLog}\left (2,1-\frac{2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{2 d}+\frac{i b \text{PolyLog}(2,-i c x)}{2 d}-\frac{i b \text{PolyLog}(2,i c x)}{2 d}-\frac{i b \text{PolyLog}\left (2,1-\frac{2}{1-i c x}\right )}{2 d}-\frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{d}+\frac{\log \left (\frac{2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{d}+\frac{a \log (x)}{d} \]

[Out]

(a*Log[x])/d + ((a + b*ArcTan[c*x])*Log[2/(1 - I*c*x)])/d - ((a + b*ArcTan[c*x])*Log[(2*c*(d + e*x))/((c*d + I
*e)*(1 - I*c*x))])/d + ((I/2)*b*PolyLog[2, (-I)*c*x])/d - ((I/2)*b*PolyLog[2, I*c*x])/d - ((I/2)*b*PolyLog[2,
1 - 2/(1 - I*c*x)])/d + ((I/2)*b*PolyLog[2, 1 - (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/d

________________________________________________________________________________________

Rubi [A]  time = 0.186101, antiderivative size = 181, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.368, Rules used = {4876, 4848, 2391, 4856, 2402, 2315, 2447} \[ \frac{i b \text{PolyLog}\left (2,1-\frac{2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{2 d}+\frac{i b \text{PolyLog}(2,-i c x)}{2 d}-\frac{i b \text{PolyLog}(2,i c x)}{2 d}-\frac{i b \text{PolyLog}\left (2,1-\frac{2}{1-i c x}\right )}{2 d}-\frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{d}+\frac{\log \left (\frac{2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{d}+\frac{a \log (x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c*x])/(x*(d + e*x)),x]

[Out]

(a*Log[x])/d + ((a + b*ArcTan[c*x])*Log[2/(1 - I*c*x)])/d - ((a + b*ArcTan[c*x])*Log[(2*c*(d + e*x))/((c*d + I
*e)*(1 - I*c*x))])/d + ((I/2)*b*PolyLog[2, (-I)*c*x])/d - ((I/2)*b*PolyLog[2, I*c*x])/d - ((I/2)*b*PolyLog[2,
1 - 2/(1 - I*c*x)])/d + ((I/2)*b*PolyLog[2, 1 - (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/d

Rule 4876

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Int[Ex
pandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p,
 0] && IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4856

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTan[c*x])*Log[2/(1 -
 I*c*x)])/e, x] + (Dist[(b*c)/e, Int[Log[2/(1 - I*c*x)]/(1 + c^2*x^2), x], x] - Dist[(b*c)/e, Int[Log[(2*c*(d
+ e*x))/((c*d + I*e)*(1 - I*c*x))]/(1 + c^2*x^2), x], x] + Simp[((a + b*ArcTan[c*x])*Log[(2*c*(d + e*x))/((c*d
 + I*e)*(1 - I*c*x))])/e, x]) /; FreeQ[{a, b, c, d, e}, x] && NeQ[c^2*d^2 + e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2447

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[(Pq^m*(1 - u))/D[u, x]]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rubi steps

\begin{align*} \int \frac{a+b \tan ^{-1}(c x)}{x (d+e x)} \, dx &=\int \left (\frac{a+b \tan ^{-1}(c x)}{d x}-\frac{e \left (a+b \tan ^{-1}(c x)\right )}{d (d+e x)}\right ) \, dx\\ &=\frac{\int \frac{a+b \tan ^{-1}(c x)}{x} \, dx}{d}-\frac{e \int \frac{a+b \tan ^{-1}(c x)}{d+e x} \, dx}{d}\\ &=\frac{a \log (x)}{d}+\frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1-i c x}\right )}{d}-\frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d}+\frac{(i b) \int \frac{\log (1-i c x)}{x} \, dx}{2 d}-\frac{(i b) \int \frac{\log (1+i c x)}{x} \, dx}{2 d}-\frac{(b c) \int \frac{\log \left (\frac{2}{1-i c x}\right )}{1+c^2 x^2} \, dx}{d}+\frac{(b c) \int \frac{\log \left (\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{1+c^2 x^2} \, dx}{d}\\ &=\frac{a \log (x)}{d}+\frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1-i c x}\right )}{d}-\frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d}+\frac{i b \text{Li}_2(-i c x)}{2 d}-\frac{i b \text{Li}_2(i c x)}{2 d}+\frac{i b \text{Li}_2\left (1-\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{2 d}-\frac{(i b) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1-i c x}\right )}{d}\\ &=\frac{a \log (x)}{d}+\frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1-i c x}\right )}{d}-\frac{\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d}+\frac{i b \text{Li}_2(-i c x)}{2 d}-\frac{i b \text{Li}_2(i c x)}{2 d}-\frac{i b \text{Li}_2\left (1-\frac{2}{1-i c x}\right )}{2 d}+\frac{i b \text{Li}_2\left (1-\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{2 d}\\ \end{align*}

Mathematica [A]  time = 0.0950062, size = 169, normalized size = 0.93 \[ \frac{-i b \text{PolyLog}\left (2,\frac{e (1-i c x)}{e+i c d}\right )+i b \text{PolyLog}\left (2,-\frac{e (c x-i)}{c d+i e}\right )+i b \text{PolyLog}(2,-i c x)-i b \text{PolyLog}(2,i c x)-2 a \log (d+e x)+2 a \log (x)-i b \log (1-i c x) \log \left (\frac{c (d+e x)}{c d-i e}\right )+i b \log (1+i c x) \log \left (\frac{c (d+e x)}{c d+i e}\right )}{2 d} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*ArcTan[c*x])/(x*(d + e*x)),x]

[Out]

(2*a*Log[x] - 2*a*Log[d + e*x] - I*b*Log[1 - I*c*x]*Log[(c*(d + e*x))/(c*d - I*e)] + I*b*Log[1 + I*c*x]*Log[(c
*(d + e*x))/(c*d + I*e)] + I*b*PolyLog[2, (-I)*c*x] - I*b*PolyLog[2, I*c*x] - I*b*PolyLog[2, (e*(1 - I*c*x))/(
I*c*d + e)] + I*b*PolyLog[2, -((e*(-I + c*x))/(c*d + I*e))])/(2*d)

________________________________________________________________________________________

Maple [A]  time = 0.051, size = 260, normalized size = 1.4 \begin{align*} -{\frac{a\ln \left ( ecx+dc \right ) }{d}}+{\frac{a\ln \left ( cx \right ) }{d}}-{\frac{b\arctan \left ( cx \right ) \ln \left ( ecx+dc \right ) }{d}}+{\frac{b\arctan \left ( cx \right ) \ln \left ( cx \right ) }{d}}+{\frac{{\frac{i}{2}}b\ln \left ( cx \right ) \ln \left ( 1+icx \right ) }{d}}-{\frac{{\frac{i}{2}}b\ln \left ( cx \right ) \ln \left ( 1-icx \right ) }{d}}+{\frac{{\frac{i}{2}}b{\it dilog} \left ( 1+icx \right ) }{d}}-{\frac{{\frac{i}{2}}b{\it dilog} \left ( 1-icx \right ) }{d}}-{\frac{{\frac{i}{2}}b\ln \left ( ecx+dc \right ) }{d}\ln \left ({\frac{ie-ecx}{dc+ie}} \right ) }+{\frac{{\frac{i}{2}}b\ln \left ( ecx+dc \right ) }{d}\ln \left ({\frac{ie+ecx}{ie-dc}} \right ) }-{\frac{{\frac{i}{2}}b}{d}{\it dilog} \left ({\frac{ie-ecx}{dc+ie}} \right ) }+{\frac{{\frac{i}{2}}b}{d}{\it dilog} \left ({\frac{ie+ecx}{ie-dc}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c*x))/x/(e*x+d),x)

[Out]

-a/d*ln(c*e*x+c*d)+a/d*ln(c*x)-b*arctan(c*x)/d*ln(c*e*x+c*d)+b/d*arctan(c*x)*ln(c*x)+1/2*I*b/d*ln(c*x)*ln(1+I*
c*x)-1/2*I*b/d*ln(c*x)*ln(1-I*c*x)+1/2*I*b/d*dilog(1+I*c*x)-1/2*I*b/d*dilog(1-I*c*x)-1/2*I*b/d*ln(c*e*x+c*d)*l
n((I*e-e*c*x)/(d*c+I*e))+1/2*I*b/d*ln(c*e*x+c*d)*ln((I*e+e*c*x)/(I*e-d*c))-1/2*I*b/d*dilog((I*e-e*c*x)/(d*c+I*
e))+1/2*I*b/d*dilog((I*e+e*c*x)/(I*e-d*c))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -a{\left (\frac{\log \left (e x + d\right )}{d} - \frac{\log \left (x\right )}{d}\right )} + 2 \, b \int \frac{\arctan \left (c x\right )}{2 \,{\left (e x^{2} + d x\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x/(e*x+d),x, algorithm="maxima")

[Out]

-a*(log(e*x + d)/d - log(x)/d) + 2*b*integrate(1/2*arctan(c*x)/(e*x^2 + d*x), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b \arctan \left (c x\right ) + a}{e x^{2} + d x}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x/(e*x+d),x, algorithm="fricas")

[Out]

integral((b*arctan(c*x) + a)/(e*x^2 + d*x), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))/x/(e*x+d),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \arctan \left (c x\right ) + a}{{\left (e x + d\right )} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x/(e*x+d),x, algorithm="giac")

[Out]

integrate((b*arctan(c*x) + a)/((e*x + d)*x), x)